-- local foo = require('foo.lua')  -- error no file
local foo = require('foo')
foo.say_hello()

-- local haha = require('./lib/haha.lua')  -- error no file 
-- local haha = require('./lib/haha') -- ok
local haha = require('lib.haha')  -- also ok
haha.say_hello()

--[[
why require local file cannot end with .lua
according to https://www.lua.org/pil/8.1.html
if require('foo.lua')
it will search foo.lua, and it is there
but it fails

--]]